<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/7
 * Time: 16:58
 */

namespace app\weixin\controller;

//模板消息发送日志
class TemplateMsgLog extends Base
{
    public function _initialize()
    {
        parent::_initialize();
    }

    //模板消息发送日志列表
    public function index(){     
        $pagesize = config('paginate')['list_rows'];//每页数量
        $param=request()->param(); //获取url参数
        $lists = db('template_msg_send_log')
                 ->alias('tl')
                ->join('template_msg tm','tl.tpl_id=tm.tpl_id')
                ->order('id desc')
                ->field('tl.*,tm.name')
                ->paginate($pagesize,false,array('query' => array_splice($param,1)));
        $this->assign("lists",$lists);
        $this->assign("page", $lists->render());
        return $this->fetch();
    }
}